.class public Lcn/cheln/explorer/func/EmptyDirectoryCleaner;
.super Lcn/cheln/explorer/ds/sdcard/TypeFilter;


# static fields
.field public static a:Z

.field public static b:Ljava/util/Set;


# instance fields
.field private c:[Ljava/lang/String;

.field private d:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    new-instance v0, Ljava/util/LinkedHashSet;

    invoke-direct {v0}, Ljava/util/LinkedHashSet;-><init>()V

    sput-object v0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->b:Ljava/util/Set;

    return-void
.end method

.method public constructor <init>([Ljava/lang/Integer;[Lcn/cheln/explorer/ds/sdcard/TypeFilter$TextWrapper;[Ljava/lang/String;)V
    .locals 0

    invoke-direct {p0, p1, p2, p3}, Lcn/cheln/explorer/ds/sdcard/TypeFilter;-><init>([Ljava/lang/Integer;[Lcn/cheln/explorer/ds/sdcard/TypeFilter$TextWrapper;[Ljava/lang/String;)V

    return-void
.end method

.method public static a()I
    .locals 1

    sget-object v0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->b:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->size()I

    move-result v0

    return v0
.end method

.method public static b()V
    .locals 1

    sget-object v0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->b:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->clear()V

    return-void
.end method


# virtual methods
.method public accept(Ljava/io/File;)Z
    .locals 5

    const/4 v4, 0x0

    invoke-super {p0, p1}, Lcn/cheln/explorer/ds/sdcard/TypeFilter;->accept(Ljava/io/File;)Z

    move-result v0

    if-eqz v0, :cond_3

    invoke-virtual {p1}, Ljava/io/File;->isDirectory()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcn/cheln/support/app/a;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->d:Ljava/lang/String;

    const-string v1, "LEWA/THEME"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->d:Ljava/lang/String;

    const-string v1, ".NOMEDIA"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_1

    invoke-virtual {p1}, Ljava/io/File;->list()[Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->c:[Ljava/lang/String;

    iget-object v0, p0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->c:[Ljava/lang/String;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->c:[Ljava/lang/String;

    array-length v0, v0

    if-nez v0, :cond_2

    :cond_0
    sget-object v0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->b:Ljava/util/Set;

    new-instance v1, Lcn/cheln/explorer/beans/ReportInfo;

    invoke-virtual {p1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v1, v2, v3}, Lcn/cheln/explorer/beans/ReportInfo;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    invoke-virtual {p1}, Ljava/io/File;->delete()Z

    :cond_1
    :goto_0
    move v0, v4

    :goto_1
    return v0

    :cond_2
    invoke-virtual {p1, p0}, Ljava/io/File;->listFiles(Ljava/io/FileFilter;)[Ljava/io/File;

    goto :goto_0

    :cond_3
    move v0, v4

    goto :goto_1
.end method
